//2009/08/25 15:44:33
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class HockeyFault
{
public:
    int numPlayers(int width, int height, int x, int y, vector <int> px, vector <int> py)
    {
		int ret = 0;
		for(int i=0; i<px.size(); i++)
		{
			if(check(width, height, x, y, px[i], py[i]))
				ret++;
		}
		return ret;
    }
	bool check(int w, int h, int x, int y, int xx, int yy)
	{
		if(xx < x)
		{
			double xax = fabs(1.0*xx - 1.0*x);
			double yay = fabs(1.0*yy - 1.0*y - 0.5*h);
			if(xax*xax + yay*yay <= 1.0*h*h/4.0) return true;
		}
		else if(xx > x+w)
		{
			double xax = fabs(1.0*xx - 1.0*x - 1.0*w);
			double yay = fabs(1.0*yy - 1.0*y - 0.5*h);
			if(xax*xax + yay*yay <= 1.0*h*h/4.0) return true;
		}
		else
		{
			if(yy >= y && yy <= h + y ) return true;
		}
		cout << xx << ", " << yy << endl;
		return false;
	}
};
